package com.itheima.health;

import com.itheima.health.util.QiniuUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class OmsBackendApplication {

    public static void main(String[] args) {
        SpringApplication.run(OmsBackendApplication.class,args);
    }
    /*
        初始化七牛工具类
        ConfigurationProperties: 读取配置文件中以qiniu为前缀的配置
     */
    @Bean
    @ConfigurationProperties(prefix = "qiniu")
    public QiniuUtils qiniuUtils() {
        return new QiniuUtils();
    }
}
